Plugin Directory: Fix callback for remove_filter call to set import status#590
Plugin Directory: Fix callback for remove_filter call to set import status#590timse201 wants to merge 2 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the WP‑CLI plugin translation import command so that the temporary gp_translation_set_import_status filter is correctly removed after import, preventing the “waiting” import status from leaking into subsequent imports within the same process (per meta.trac ticket #8216).
Changes:
- Use
$assoc_args['format'] ?? 'po'and$assoc_args['set'] ?? 'default'for clearer CLI option defaults. - Fix
remove_filter()to use the same callable ([ $this, '__string_status_waiting' ]) that was used withadd_filter().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes: https://meta.trac.wordpress.org/ticket/8216